package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

/**
 * Created by IntelliJ IDEA.
 * User: Manu
 * Date: 17 mai 2009
 * Time: 19:26:36
 * To change this template use File | Settings | File Templates.
 */
public interface UltraSimpleTransactionService extends RemoteService {
  void entrerTransaction(String dequi, String nomCompte, String quoi, float combien, String aqui, float pourcentage) throws MonException;

  /**
   * Utility/Convenience class.
   * Use UltraSimpleTransactionService.App.getInstance() to access static instance of UltraSimpleTransactionServiceAsync
   */
  public static class App {
    private static final UltraSimpleTransactionServiceAsync ourInstance;

    static {
      ourInstance = (UltraSimpleTransactionServiceAsync) GWT.create(UltraSimpleTransactionService.class);
      ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "UltraSimpleTransactionService");
    }

    public static UltraSimpleTransactionServiceAsync getInstance() {
      return ourInstance;
    }
  }
}
